HAL OPAMP migration: List of applicable concepts ¶
This section provides information about the HAL OPAMP applicable architecture concepts.
Concepts for OPAMP ¶
|
Concept |
Description |
|---|---|
|
The initialization has been split into two levels of functions:
|
|
|
Removal and conversion of init structure to configuration structure |
The init structure for the OPAMP has been removed from the handle and converted into
|
|
The handle structure has been renamed to
|
|
|
The structure
|
|
|
|
|
|
New APIs are available to get and set OPAMP features. |
|
|
Two functions to set and get user data are available:
|
|
|
HAL OPAMP APIs now rely on LL APIs rather than performing direct register access. |
|
|
Define statements and enumerations redirected to LL equivalents |
HAL OPAMP define statements and enumerations are based on LL define statements. |
|
All hardware macros have been removed from the HAL OPAMP driver, and equivalent services are ensured through the LL APIs. |
|
|
The OPAMP is now managed by a global state machine . |
|
|
The HAL OPAMP functions were updated to return:
|
|
|
There is no need for error management in the OPAMP driver, as no error conditions are generated by this peripheral. |
|
|
All TypeDef parts of the HAL OPAMP driver have been removed and replaced by
|
|
|
Const keywords have been added to non-modifiable pointers to ensure that either the pointer itself or the data it points to cannot be modified. This enhances code safety and readability, prevents unintended modifications, and renders code more robust and maintainable. |
|
|
The parameters and state are checked using
|
|
|
Merge HAL extension files with common ones and remove the EX prefix from APIs. |
Only one HAL OPAMP header file remains and all macros, define statements, and functions from
|
|
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels. |
Finite parameters (including OPAMP instances) have been converted into enumerated types (enums) at HAL level. This improves code readability, maintainability, and type safety. |
Other HAL OPAMP changes ¶
|
Concept |
Consideration |
|---|---|
|
Split each calibration and trimming functions call in two mode |
There is no longer a dedicated calibration parameter in the configuration structure. The calibration mode (normal or low power) is now provided as a parameter to the dedicated calibration function. |
|
Trimming for all instances in parallel |
|